package com.sunther.document.service;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sunther.document.entity.FileEntity;
import com.sunther.idb.common.util.WebResult;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

/**
 * @author admin
 */
public interface FileService extends IService<FileEntity> {
    WebResult upload(MultipartFile[] files) throws Exception;

    WebResult saveFileData(FileEntity data, HttpServletRequest request);

    void downloadFile(String id, String fileId,Integer roleId, HttpServletRequest request, HttpServletResponse response) throws IOException;

    Page pageList(HttpServletRequest request, String keyword, String tagName, Integer state, String systemId,Integer uploadUserId,String selectProId, int pageNumber, int pageSize);

    WebResult cancel(String id);

    WebResult delete(String id,HttpServletRequest request);

    WebResult getUploaderByProject(String projectId);

    WebResult getStateAndCount(String selectProId, String systemId, String keyword, String tagName, Integer uploadUserId, HttpServletRequest request);

    WebResult dtl(String id);

    long getCountByProjectId(String projectId, Integer roleId, Integer userId);

    void export(String keyword, String tagName, Integer state, String systemId, Integer uploadUserId, String selectProId, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
